<?php
/**
 * Created by PhpStorm.
 * User: Dave
<<<<<<< HEAD
 * Date: 2018/6/22
 * Time: 15:46
=======
 * Date: 2018/6/28
 * Time: 15:49
>>>>>>> dev_ver_3.5.0_fix_shipping
 */

ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';


use Biz\model\smallenergy\SmallEnergyShop as mSmallEnergyShop;
use Biz\cache\SmallEnergy as cSmallEnergy;

$list = mSmallEnergyShop::getSmallEnergyList($where = " 1=1 ", ['pre_sale_reception_group_id','shop_id']);
$lists = array_column($list, null, 'shop_id');

foreach($lists as $key => $value){
    $result[] = cSmallEnergy::setSmallEnergyByShopId($key, $value['pre_sale_reception_group_id']);
}

foreach($list as $key => $value){
    cSmallEnergy::setSmallEnergyByGroupId($value['pre_sale_reception_group_id'], $value);
}

var_dump($result);

